<?php 
  session_start();  
?>
<html>
<body>  

<?php
            if($_SESSION['objem']==1){$pivo=5000;}
            if($_SESSION['objem']==2){$pivo=15000;}
            if($_SESSION['objem']==3){$pivo=35000;}
                       
?> 
<?php    
$con=mysql_connect("localhost", "smidpet5", "aez9okai");
// Check connection
if (!$con)
  {
  echo "Failed to connect to MySQL: " . mysql_connect_error();
  }

// Create database
mysql_select_db("smidpet5");       
  $jmeno=$_SESSION['jmeno'];                                                          
  $vaha=$_SESSION['objem']; 
  $vyska=$_SESSION['dvere'] ;
  $bmi=$_SESSION['barva'] ;
   
$query="INSERT INTO objednavka (Jmeno, objem, dvere, barva, cena) VALUES ('".$jmeno."','".$vaha."','".$vyska."','".$bmi."','".$pivo."')";
 $mm = mysql_query($query);

?>
  <?
echo "<meta http-equiv='refresh' content='1;url=krok.php'>";	 	    
 
?> 
</body>
</html> 